package hadoop.ch03.v17024410134;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

import java.net.URI;

public class DownHDFSFile {
    public static void main(String[] args) throws Exception{
        Configuration conf = new Configuration();
        URI uri = new URI("hdfs://192.168.30.131:8020");




        FileSystem fs = FileSystem.get(uri, conf, "hadoop");
        Path src= new Path("/17024410134/test5.txt");
        Path dst = new Path("d:\\test5.txt");



        fs.copyToLocalFile(src,dst);

        fs.close();
        System.out.println("成功");

    }



}
